<table class="form-layout">
    <?php foreach ($form as $name => $field): ?>
        <?php if ($field->isHidden()) continue; ?>
        <tr class="field-row">
            <td class="label <?php if (($validator = $form->getValidator($name, false)) && $validator->isRequired()) echo 'required' ?>"><?php echo $field->renderLabel() ?></td>
            <td class="field"><?php echo $field->render() ?></td>
            <td class="error-container"></td>
        </tr>
    <?php endforeach; ?>
</table>
